/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-31
 * Time:20:32
 */
public class Alg{
    public static <T extends Comparable<T>> T findMax(T[] array) {
        T max = array[0];
        for (int i = 1; i < array.length; i++) {
            if(max.compareTo(array[i]) < 0) {
                max = array[i];
            }
        }
        return max;
    }
}
